import { create } from "zustand";
import { immer } from "zustand/middleware/immer";

export type ToolStore = {
    tools: Tool[];
    setTools: (tools: Tool[]) => void;
};

export type Tool = {};

const store = immer<ToolStore>((set, get) => {
    return {
        tools: [],
        setTools: (tools: Tool[]) => {
            set((state) => {
                state.tools = tools;
            });
        },
    };
});

export const useTools = create(store);
